import { createApp } from 'vue'
import './assets/style.css'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import router from '@/router'
import globalComponent from '@/components'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { initStore } from '@/store'
import { initPlugin } from '@/plugin'
import { initDirective } from '@/directives'

const app = createApp(App)

Object.keys(globalComponent).forEach(v => {
  app.component(v, globalComponent[v])
})
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

initStore(app)
initPlugin(app)
initDirective(app)
app.use(router)
app.use(ElementPlus)


app.mount('#myapp')
// 屏蔽黄色警告信息
app.config.warnHandler = () => null
